package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.family.FeedbackService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.FeedbackSearchRequest;
import com.tuanzi.loan.vo.response.family.FeedbackSearchResponse;
import org.springframework.data.domain.Page;

public class FeedbackLazyDataModel extends BaseLazyDataModel<FeedbackSearchRequest, FeedbackSearchResponse> {

	private FeedbackService feedbackService;

	public FeedbackLazyDataModel(FeedbackSearchRequest feedbackSearchRequest, FeedbackService feedbackService) {
		super(feedbackSearchRequest);
		this.feedbackService = feedbackService;
	}

	@Override
	protected Page<FeedbackSearchResponse> doLoad(PageSearcher<FeedbackSearchRequest> pageSearcher) {
		return feedbackService.list(pageSearcher);
	}
}
